package cool.taomu.toolkit.provider

import javax.inject.Provider
import cool.taomu.toolkit.Context
import com.google.inject.Inject
import com.google.common.util.concurrent.ListeningExecutorService
import java.util.function.Supplier
import com.google.inject.Injector

class ContextProvider implements Provider<Context> {

//	@Inject
//	protected ListeningExecutorService executor;

	Supplier<Injector> injectorSupplier;

	/* @Inject
	new(Injector injector) {
		this.injectorSupplier = [injector]
	}*/

	override get() {
		var context = new Context();
		//context.executor = executor;
		context.injectorSupplier = injectorSupplier;
		return context;
	}

}
